package com.jbit.hxy.feign;

import com.jbit.hxy.common.Result;
import com.jbit.hxy.feign.fallback.MenuFeignClientFallback;
import com.jbit.hxy.model.po.WxDish;
import com.jbit.hxy.model.po.WxDishFlavor;
import com.jbit.hxy.model.po.WxSetmealDish;
import com.jbit.hxy.model.vo.WxDishFlavorVO;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "menu-service",fallback = MenuFeignClientFallback.class)
public interface MenuFeignClient {
    @GetMapping("/flavor/getFlavorByDishId")
    Result<List<WxDishFlavorVO>> getFlavorByDishId(@RequestParam(value = "dishId") Integer dishId);

    @GetMapping("/dish/getDishNameById")
    Result getDishNameById(@RequestParam("id") Integer dishId);
    @GetMapping("/setmeal/getDishCountBySetmealId")
    Result getDishCountBySetmealId(@RequestParam("id") Integer id);
    @GetMapping("/setmeal/getSetmealNameById")
    Result getSetmealNameById(@RequestParam("id") Integer id);
    @GetMapping("/setmeal/getSetmealDishBySetmealId")
    Result<List<WxSetmealDish>> getSetmealDishBySetmealId(@RequestParam("id") Integer id);
    @GetMapping("/dish/getDishById")
    Result<WxDish> getDishById(@RequestParam("id") Integer dishId);
    @GetMapping("/flavor/getFlavorIdByDishId")
    Result<List<Integer>> getFlavorIdByDishId(@RequestParam(value = "dishId") Integer dishId);
    @GetMapping("/flavor/selectFlavorById")
    Result<WxDishFlavor> selectFlavorById(@RequestParam(value = "id") Integer id);
}
